﻿using System;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using Runda.EShop.Common.Utility;

namespace Runda.EShop.Dal
{
    /// <summary>
    /// DAL layer class dbo.Sys_Order_ServiceStatus.
    /// </summary>
    public partial class SysOrderServiceStatusDal : DalBase
    {

        public void UpdateOrderServiceStatus(Guid ID, EnumHelper.OrderServiceStatus status,string Message)
        {
            string sql = "UPDATE Sys_Order_ServiceStatus SET [Status]=@Status,Message=@Message WHERE ID=@ID";

            DbCommand dbcommand = CurrentDatabase.GetSqlStringCommand(sql);
            CurrentDatabase.AddInParameter(dbcommand, "@Status", DbType.Int32, (int)status);
            CurrentDatabase.AddInParameter(dbcommand, "@ID", DbType.Guid, ID);
            CurrentDatabase.AddInParameter(dbcommand, "@Message", DbType.String, Message);

            CurrentDatabase.ExecuteNonQuery(dbcommand);
        }
    }
}
